import 'package:flutter/material.dart';

abstract class AppColor {
  /// 项目基础颜色
  static const Color white = Color(0xFFFFFFFF);
  static const Color black = Color(0xFF000000);
  static const Color red = Color(0xFFF5222D);
  static const Color green = Color(0xFF0EAF4E);
  static const Color blue = Color(0xFF0077FF);
  static const Color orange = Color(0xFFFF9800);
  static const Color grey = Color(0xFF999999);
  static const Color lightGrey = Color(0xFFF5F5F5);
  static const Color borderGrey = Color(0xFFE5E5E5);
  static const Color lineColor = Color(0xFFEEEEEE);
  static const Color darkGrey = Color(0xFF1A1A1A);
  static const Color background = Color(0xFFF9F9F9);

  static const Color _primary = Color(0xFF2B5CFF);
  static const Color _secondary = Color(0xFF5C8BFF);
  static const Color transparent = Colors.transparent;

  /// 主色调
  static const Color primary = _primary;

  ///次级主色调
  static const Color secondary = _secondary;

  /// 功能颜色
  static const Color success = green;
  static const Color warning = red;
  static const Color error = red;
  static const Color info = blue;

  /// 文字颜色
  static const Color textPrimary = black;
  static const Color textSecondary = grey;
  static const Color textHint = grey;
  static const Color textError = red;
  static const Color textSuccess = green;

  /// 背景颜色
  static const Color scaffoldBackground = background;
  static const Color cardBackground = white;
  static const Color inputBackground = lightGrey;
  static const Color logoBackground = darkGrey;

  /// 边框和分割线
  static const Color border = borderGrey;

  /// 按钮颜色
  static const Color buttonPrimary = primary;
  static const Color buttonSuccess = green;
  static const Color buttonWarning = orange;
  static const Color buttonError = red;
  static const Color buttonText = white;
  static const Color buttonDisabled = lightGrey;

  /// 渐变
  static const List<Color> homeCardGradients = [Color(0x99E0EAFC), Color(0x99CFDEF3)];

  /// 动态颜色
  static Color get dialogDivider => black.withValues(alpha: 0.55);
  static Color get maskColor => black.withValues(alpha: 0.2);
}
